package org.yookiee.support.enums;

import com.google.common.base.Strings;

/**
 * FileName Scope
 * Package org.yookiee.support.enums
 * Description
 * author cpstory
 * create 2023-12-01 13:37
 * version V1.0
 */
public enum Scope {

    JAVA("java"),
    WEB("web"),
    ;

    private String scope;

    Scope(String scope) {
        this.scope = scope;
    }

    public static Scope format(String target){
        if(Strings.isNullOrEmpty(target)){
            return null;
        }
        for (Scope value : Scope.values()) {
            if(value.scope.equals(target)){
                return value;
            }
        }
        return null;
    }

    public String getScope() {
        return scope;
    }

    public void setScope(String scope) {
        this.scope = scope;
    }
}
